# -*- coding: utf-8 -*-
import json

def clearBlankLine():
    file1 = open('/Users/lch/Downloads/333.txt', 'r')  # 要去掉空行的文件
    file2 = open('/Users/lch/data/temp.txt', 'w')  # 生成没有空行的文件
    try:
        max = 0
        for line in file1.readlines():
            data = line.split("headerName")[0]
            zhibi = data.split("fieldValue")[1]
            print(len(zhibi) - 10)
            print(zhibi)
            if ((len(zhibi) - 10) > max):
                max = (len(zhibi) - 10)
        print(max)
    finally:
        file1.close()
        file2.close()


if __name__ == '__main__':
    clearBlankLine()
